package com.jbm.onehome.iface;

import com.jbm.core.iface.IAcross;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * Created by lyh on 2017-03-07.
 */
@Entity
@Table(name = "iorder", schema = "", catalog = "jbmcore")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class IorderEntity extends IAcross
{
    private static final long serialVersionUID = -5404932865531346611L;
    @Transient
    public boolean back;
    @Transient
    public String method;
    @Transient
    public String errorinfo;
    @Transient
    public int count;
    @Transient
    public int start=0;
    @Transient
    public int pagesize=0;
    @Transient
    public Integer tableid;
    private int orderId;
    private String orderCode;  //订单编号
    private int memberId;
    private int sellerId;
    private int caddrId;
    private String itemDesc;
    private String type;
    private String status;
    private Timestamp createDate;
    private int createId;
    private Timestamp expireDate;
    private Timestamp closeDate;
    private Integer closeId;
    private String ctStr;
    private String comDesc;
    private Integer comSpeedLevel;
    private Integer comQualityLevel;
    private Integer comAttitudeLevel;
    private Timestamp comDate;
    private BigDecimal amount;
    private BigDecimal jobAmount;
    private BigDecimal itemAmount;
    private Integer oldSellerId;
    private Integer sactId;
    private Integer voucher;
    private String contacts;  //联系人
    private String mobile;    //联系电话
    private String giText;   //地址
    private List<JobOrderEntity> joborderlist;
    private  List<OrdAttachmentEntity>   ordattachmentlist;
    private    int is_inner;
    private String nickname ;//创建人 评论人昵称
    private Integer cgId;
    private String giType;
    private String payType;
    private Integer isTurned;
    private Integer isSettlement;
    private List<VisitlogsEntity> visitlogsEntities;
    private String ordertime;
    private Integer sourceSeller;
    private String gcfContract;
    private String extOrderCode;
    private Integer gi_id;
    private String proxy;
    private String proxyMobile;
    private String dispatchDate;

    public IorderEntity()
    {
        super();
    }

    public IorderEntity(IAcross ia)
    {
        super(ia);
    }

    public  IorderEntity(boolean back,String errorinfo)
    {
        this.back= back;
        this.errorinfo=errorinfo;

    }

    public void setMemberId(Integer memberId) {
        this.memberId = memberId;
    }

    public void setCaddrId(Integer caddrId) {
        this.caddrId = caddrId;
    }

    @Id
    @Column(name = "order_id")
    @GeneratedValue
    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    @Basic
    @Column(name = "order_code")
    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    @Basic
    @Column(name = "member_id")
    public int getMemberId() {
        return memberId;
    }

    public void setMemberId(int memberId) {
        this.memberId = memberId;
    }

    @Basic
    @Column(name = "seller_id")
    public int getSellerId() {
        return sellerId;
    }

    public void setSellerId(int sellerId) {
        this.sellerId = sellerId;
    }

    @Basic
    @Column(name = "caddr_id")
    public int getCaddrId() {
        return caddrId;
    }

    public void setCaddrId(int caddrId) {
        this.caddrId = caddrId;
    }

    @Basic
    @Column(name = "item_desc")
    public String getItemDesc() {
        return itemDesc;
    }

    public void setItemDesc(String itemDesc) {
        this.itemDesc = itemDesc;
    }

    @Basic
    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "create_id")
    public int getCreateId() {
        return createId;
    }

    public void setCreateId(int createId) {
        this.createId = createId;
    }

    @Basic
    @Column(name = "expire_date")
    public Timestamp getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Timestamp expireDate) {
        this.expireDate = expireDate;
    }

    @Basic
    @Column(name = "close_date")
    public Timestamp getCloseDate() {
        return closeDate;
    }

    public void setCloseDate(Timestamp closeDate) {
        this.closeDate = closeDate;
    }

    @Basic
    @Column(name = "close_id")
    public Integer getCloseId() {
        return closeId;
    }

    public void setCloseId(Integer closeId) {
        this.closeId = closeId;
    }

    @Basic
    @Column(name = "ct_str")
    public String getCtStr() {
        return ctStr;
    }

    public void setCtStr(String ctStr) {
        this.ctStr = ctStr;
    }

    @Basic
    @Column(name = "com_desc")
    public String getComDesc() {
        return comDesc;
    }

    public void setComDesc(String comDesc) {
        this.comDesc = comDesc;
    }

    @Basic
    @Column(name = "com_speed_level")
    public Integer getComSpeedLevel() {
        return comSpeedLevel;
    }

    public void setComSpeedLevel(Integer comSpeedLevel) {
        this.comSpeedLevel = comSpeedLevel;
    }

    @Basic
    @Column(name = "com_quality_level")
    public Integer getComQualityLevel() {
        return comQualityLevel;
    }

    public void setComQualityLevel(Integer comQualityLevel) {
        this.comQualityLevel = comQualityLevel;
    }

    @Basic
    @Column(name = "com_attitude_level")
    public Integer getComAttitudeLevel() {
        return comAttitudeLevel;
    }

    public void setComAttitudeLevel(Integer comAttitudeLevel) {
        this.comAttitudeLevel = comAttitudeLevel;
    }

    @Basic
    @Column(name = "com_date")
    public Timestamp getComDate() {
        return comDate;
    }

    public void setComDate(Timestamp comDate) {
        this.comDate = comDate;
    }

    @Basic
    @Column(name = "amount")
    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    @Basic
    @Column(name = "job_amount")
    public BigDecimal getJobAmount() {
        return jobAmount;
    }

    public void setJobAmount(BigDecimal job_amount) {
        this.jobAmount = job_amount;
    }

    @Basic
    @Column(name = "item_amount")
    public BigDecimal getItemAmount() {
        return itemAmount;
    }

    public void setItemAmount(BigDecimal itemAmount) {
        this.itemAmount = itemAmount;
    }

    @Basic
    @Column(name = "old_seller_id")
    public Integer getOldSellerId() {
        return oldSellerId;
    }

    public void setOldSellerId(Integer oldSellerId) {
        this.oldSellerId = oldSellerId;
    }

    @Basic
    @Column(name = "sact_id")
    public Integer getSactId() {
        return sactId;
    }

    public void setSactId(Integer sactId) {
        this.sactId = sactId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        IorderEntity that = (IorderEntity) o;

        if (caddrId != that.caddrId) return false;
        if (createId != that.createId) return false;
        if (memberId != that.memberId) return false;
        if (orderId != that.orderId) return false;
        if (sellerId != that.sellerId) return false;
        // if (amount != null ? !amount.equals(that.amount) : that.amount != null) return false;
        if (closeDate != null ? !closeDate.equals(that.closeDate) : that.closeDate != null) return false;
        if (closeId != null ? !closeId.equals(that.closeId) : that.closeId != null) return false;
        if (comAttitudeLevel != null ? !comAttitudeLevel.equals(that.comAttitudeLevel) : that.comAttitudeLevel != null)
            return false;
        if (comDate != null ? !comDate.equals(that.comDate) : that.comDate != null) return false;
        if (comDesc != null ? !comDesc.equals(that.comDesc) : that.comDesc != null) return false;
        if (comQualityLevel != null ? !comQualityLevel.equals(that.comQualityLevel) : that.comQualityLevel != null)
            return false;
        if (comSpeedLevel != null ? !comSpeedLevel.equals(that.comSpeedLevel) : that.comSpeedLevel != null)
            return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (ctStr != null ? !ctStr.equals(that.ctStr) : that.ctStr != null) return false;
        if (expireDate != null ? !expireDate.equals(that.expireDate) : that.expireDate != null) return false;
        if (itemDesc != null ? !itemDesc.equals(that.itemDesc) : that.itemDesc != null) return false;
        if (oldSellerId != null ? !oldSellerId.equals(that.oldSellerId) : that.oldSellerId != null) return false;
        if (orderCode != null ? !orderCode.equals(that.orderCode) : that.orderCode != null) return false;
        if (sactId != null ? !sactId.equals(that.sactId) : that.sactId != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = orderId;
        result = 31 * result + (orderCode != null ? orderCode.hashCode() : 0);
        result = 31 * result + memberId;
        result = 31 * result + sellerId;
        result = 31 * result + caddrId;
        result = 31 * result + (itemDesc != null ? itemDesc.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + createId;
        result = 31 * result + (expireDate != null ? expireDate.hashCode() : 0);
        result = 31 * result + (closeDate != null ? closeDate.hashCode() : 0);
        result = 31 * result + (closeId != null ? closeId.hashCode() : 0);
        result = 31 * result + (ctStr != null ? ctStr.hashCode() : 0);
        result = 31 * result + (comDesc != null ? comDesc.hashCode() : 0);
        result = 31 * result + (comSpeedLevel != null ? comSpeedLevel.hashCode() : 0);
        result = 31 * result + (comQualityLevel != null ? comQualityLevel.hashCode() : 0);
        result = 31 * result + (comAttitudeLevel != null ? comAttitudeLevel.hashCode() : 0);
        result = 31 * result + (comDate != null ? comDate.hashCode() : 0);
        // result = 31 * result + (amount != null ? amount.hashCode() : 0);
        result = 31 * result + (oldSellerId != null ? oldSellerId.hashCode() : 0);
        result = 31 * result + (sactId != null ? sactId.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "voucher")
    public Integer getVoucher() {
        return voucher;
    }

    public void setVoucher(Integer voucher) {
        this.voucher = voucher;
    }

    @Basic
    @Column(name = "contacts")
    public String getContacts() {
        return contacts;
    }

    public void setContacts(String contacts) {
        this.contacts = contacts;
    }

    @Basic
    @Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Basic
    @Column(name = "gi_text")
    public String getGiText() {
        return giText;
    }

    public void setGiText(String giText) {
        this.giText = giText;
    }

    @Transient
    public List<JobOrderEntity> getJoborderlist() {
        return joborderlist;
    }

    public void setJoborderlist(List<JobOrderEntity> joborderlist) {
        this.joborderlist = joborderlist;
    }

    @Transient
    public List<OrdAttachmentEntity> getOrdattachmentlist() {
        return ordattachmentlist;
    }

    public void setOrdattachmentlist(List<OrdAttachmentEntity> ordattachmentlist) {
        this.ordattachmentlist = ordattachmentlist;
    }

    @Transient
    public int getIs_inner() {
        return is_inner;
    }

    public void setIs_inner(int is_inner) {
        this.is_inner = is_inner;
    }

    @Transient
    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    @Basic
    @Column(name = "cg_id")
    public Integer getCgId() {
        return cgId;
    }

    public void setCgId(Integer cgId) {
        this.cgId = cgId;
    }

    @Basic
    @Column(name = "gi_type")
    public String getGiType() {
        return giType;
    }

    public void setGiType(String giType) {
        this.giType = giType;
    }

    @Basic
    @Column(name = "pay_type")
    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    @Basic
    @Column(name = "is_turned")
    public Integer getIsTurned() {
        return isTurned;
    }

    public void setIsTurned(Integer isTurned) {
        this.isTurned = isTurned;
    }

    @Basic
    @Column(name = "is_settlement")
    public Integer getIsSettlement() {
        return isSettlement;
    }

    public void setIsSettlement(Integer isSettlement) {
        this.isSettlement = isSettlement;
    }

    @Transient
    public List<VisitlogsEntity> getVisitlogsEntities() {
        return visitlogsEntities;
    }

    public void setVisitlogsEntities(List<VisitlogsEntity> visitlogsEntities) {
        this.visitlogsEntities = visitlogsEntities;
    }

    @Basic
    @Column(name = "ordertime")
    public String getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(String ordertime) {
        this.ordertime = ordertime;
    }

    @Basic
    @Column(name = "source_seller")
    public Integer getSourceSeller() {
        return sourceSeller;
    }

    public void setSourceSeller(Integer sourceSeller) {
        this.sourceSeller = sourceSeller;
    }





    @Basic
    @Column(name = "proxy_mobile")
    public String getProxyMobile() {
        return proxyMobile;
    }

    public void setProxyMobile(String proxyMobile) {
        this.proxyMobile = proxyMobile;
    }

    @Basic
    @Column(name = "proxy")
    public String getProxy() {
        return proxy;
    }

    public void setProxy(String proxy) {
        this.proxy = proxy;
    }

    @Basic
    @Column(name = "gi_Id")
    public Integer getGiId() {
        return gi_id;
    }

    public void setGiId(Integer gi_id) {
        this.gi_id = gi_id;
    }

    @Basic
    @Column(name = "ext_order_code")
    public String getExtOrderCode() {
        return extOrderCode;
    }

    public void setExtOrderCode(String extOrderCode) {
        this.extOrderCode = extOrderCode;
    }

    @Basic
    @Column(name = "gcf_contract")
    public String getGcfContract() {
        return gcfContract;
    }



    public void setGcfContract(String gcfContract) {
        this.gcfContract = gcfContract;
    }


    @Basic
    @Column(name = "dispatch_date")
    public String getDispatchDate() {
        return dispatchDate;
    }

    public void setDispatchDate(String dispatchDate) {
        this.dispatchDate = dispatchDate;
    }
}
